
class RahaSalkku:

    def __init__(self):
        self.rahat = ["100$", "100$", "100$", "100$", "100$", "100$"]

    class Iterator:
        def __init__(self, rahat):
            self.rahatukko = rahat
            self.indeksi = 0
        def __iter__(self):
            return self
        def next(self):
            if self.indeksi < len(self.rahatukko):
                nykyinen = self.rahatukko[self.indeksi]
                self.indeksi += 1
                return nykyinen
            else:
                raise StopIteration()

    def __iter__(self):
        return self.Iterator(self.rahat)

salkku = RahaSalkku()
for seteli in salkku:
    print seteli
